//导入 react
import React from "react";
//导入 react-dom
import { createRoot } from "react-dom/client";
//导入 App.js
import App from "./App";
//导入 store.js  执行 store.js 中的代码
import store from  './redux/store';

//创建根元素
let root = createRoot(document.querySelector("#root"));

//根元素对象渲染组件
root.render(<App />);

//订阅
store.subscribe(() => {
  //重新渲染
  root.render(<App />);
});
